package com.campus.controller;

import com.campus.controller.common.ResponseResult;
import com.campus.dto.CourseDto;
import com.campus.service.TeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping({"/campus/teacher"})
public class TeacherController {
    @Autowired
    TeacherService teacherService;

    @PostMapping("/course/add")
    public ResponseResult addCourse(CourseDto courseDto){
        return ResponseResult.ok(teacherService.addCourse(courseDto));
    }
}
